Skip to content

First cycle: Supabase auth, hardened votes/proposals, verified wallet linking, sourced bills - #22

Closed
samtheloanman wants to merge 16 commits into
masterfrom
feat/first-cycle-auth-civic
Closed

samtheloanman wants to merge 16 commits into
masterfrom
feat/first-cycle-auth-civic

Conversation

@samtheloanman

Copy link
Copy Markdown
Owner

First-cycle release plan (docs/superpowers/plans/2026-11-03-utp-first-cycle-release-identity-civic.md), 16 commits on master 777658f.

Changes

  • Auth: imports the Supabase session/OAuth work with a same-origin redirect guard; one shared requireUser resolver for API routes.
  • Votes: /api/vote drops the service-role key, validates input, scopes writes to the user's own vote, and keeps tallies correct under concurrency (migration 20261104000000_vote_integrity).
  • Proposals: /api/propose requires login and no longer exposes proposer_id; adds the missing voting_proposals migration, hardened over legacy tables.
  • Wallet linking: requires a wallet signature plus a server HMAC attestation that the database verifies itself, for both link and unlink (WALLET_LINK_SECRET).
  • Bills: Congress.gov and OpenStates (CA) adapters; missing keys or provider failure show "Unavailable", never fixtures marked live.
  • UI: sample pages are labelled "Sample data"; voting on sample issues is disabled.

Not done before merge

  • The four migrations are not applied anywhere. The target Supabase project still needs choosing.
  • Needed secrets: WALLET_LINK_SECRET (Vercel and the DB settings table), Congress.gov key, OpenStates key, IP_SALT.
  • DB tests ran on local Postgres with an auth shim, not on real Supabase.
  • Unlink has no second-factor check yet (deferred to tiered verification).

Tests (from the build session; exact-head Dell CI is the gate)

lint, typecheck, 107 web, build, 27 DB, 175 contract.

🤖 Generated with Claude Code

claude added 16 commits November 3, 2026 21:08
…ect guard

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
…am access)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
… fixtures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
…sposable-DB tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
…proposer_id on GET

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
…the database

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSjN64Ve8j6CJk4iVbbJJV
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
utp Ready Ready Preview Nov 12, 2026 9:12am UTC

@samtheloanman

Copy link
Copy Markdown
Owner Author

Superseded by #23. This branch head 23f70bf is an ancestor of claude/utp-w2-legistar, so every commit here is in #23, and all checks on #23 are green at 4bb8e91. Branch left in place.

This branch was successfully deployed

1 active deployment
Preview — 23f70bf7 Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants